﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataFrameworkAccess.Entity;
using System.Data;
using System.Runtime.Serialization;

namespace Back.Xinkui.Entity.Manager
{
    public class VManagerUserEntity
    {

        [DataMapping("UserID", DbType.Int32), DataMember]
        public int UserID { set; get; }

        [DataMapping("UserName", DbType.String), DataMember]
        public string UserName { set; get; }

        [DataMapping("Password", DbType.String), DataMember]
        public string Password { set; get; }

        [DataMapping("RealName", DbType.String), DataMember]
        public string RealName { set; get; }

        [DataMapping("LastLoginDate", DbType.DateTime), DataMember]
        public DateTime LastLoginDate { set; get; }

        [DataMapping("LastLoginIP", DbType.String), DataMember]
        public string LastLoginIP { set; get; }

        [DataMapping("IsActive", DbType.Int16), DataMember]
        public Int16 IsActive { set; get; }

        [DataMapping("CreateID", DbType.Int32), DataMember]
        public int CreateID { set; get; }

        [DataMapping("CreateTime", DbType.DateTime), DataMember]
        public DateTime CreateTime { set; get; }

        [DataMapping("LastUpdateID", DbType.Int32), DataMember]
        public int LastUpdateID { set; get; }

        [DataMapping("UpdateTime", DbType.DateTime), DataMember]
        public DateTime UpdateTime { set; get; }

        [DataMapping("IsDeleted", DbType.Int16), DataMember]
        public Int16 IsDeleted { set; get; }

        [DataMapping("Roles", DbType.String), DataMember]
        public String Roles { set; get; }

        public List<string> RoleIds
        {
            get
            {

                return Roles.Split(',').ToList();

            }
        }
    }
}
